<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/4/21
 * Time: 16:13
 */

namespace Home\Model;


use Think\Model;

class ContactModel extends Model
{
    /* 自动验证规则 */
    protected $_validate = array(
        array('tel', '/^1[34578]\d{9}$/', '请输入正确的手机号', self::VALUE_VALIDATE, 'regex', self::MODEL_INSERT),
        array('content', 'require', '内容不能为空', self::VALUE_VALIDATE, 'regex', self::MODEL_INSERT),
    );
    protected $_auto = array(
        array('create_time', NOW_TIME, self::MODEL_INSERT),
        array('company_id', 0, self::MODEL_INSERT),
    );

}